package com.hujiheng.paike.utils;

import com.hujiheng.paike.view.CoursesView;

import java.util.ArrayList;
import java.util.List;

public class CoursesUtils {
    private static int SECTIONS = 8;

    public static List<CoursesView> getCoursesViews() {
        List<CoursesView> coursesViews = new ArrayList<>();
        for (int i = 0; i < SECTIONS; i++) {
            CoursesView coursesView = new CoursesView();
            coursesView.setCourse("第"+(i+1)+"节课");
            coursesViews.add(coursesView);
        }
        return coursesViews;
    }

    public static void setCoursesViews(List<CoursesView> coursesViews, int day, int section, String courseName) {
        CoursesView coursesView = coursesViews.get(section - 1);
        switch (day) {
            case 1 :
                coursesView.setOne(courseName);
                break;
            case 2 :
                coursesView.setTwo(courseName);
                break;
            case 3 :
                coursesView.setThree(courseName);
                break;
            case 4 :
                coursesView.setFour(courseName);
                break;
            case 5 :
                coursesView.setFive(courseName);
                break;
            default:
                break;
        }
    }
}
